package com.aliyun.oss.userController;

import com.aliyun.oss.UserService.SetmealDishService;
import com.aliyun.oss.pojo.Entity.setMealDish;
import com.aliyun.oss.pojo.Vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/user/setmealDish")
@RestController
public class SetmealDishController {
    @Autowired
    SetmealDishService setMealDishService;

    @GetMapping("/dish/{id}")
    public ResultVO dishList(@PathVariable Integer id) {
        List<setMealDish> setMealDishList = setMealDishService.dishList(id);
        return ResultVO.success(setMealDishList);
    }
}
